#ifndef CCONNECTMSG_H
#define CCONNECTMSG_H

#include "netmsg.h"

// the connect message is used when the client initially connects to the server. It is the very first message sent to the server, and contains
// generic information about the server. Most of these bits of information are designed to let the server work out if it wants to deal with the
// client in question at htis point in time, or if it should refuse the connection.
//
// - We may also want license information to be sent in this message, so we can see what license each client is using.
// - What about client version numbers?
class CConnectMsg : public CNetMsg
{
public:
    CConnectMsg();

    void setUsername(const QString &strUsername);
	QString getUsername() const;

    void setPassword(const QString &strPasswordHash);
	QString getPassword() const;

protected:
    void serialiseToStream(QDataStream&) const;
    void serialiseFromStream(QDataStream&);
private:
    QString m_strUsername;
    QString m_strPasswordHash;
};

#endif // CCONNECTMSG_H
